# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Entry do
  @moduledoc """
  An entry is a representation of a data resource that can be described by various metadata.

  ## Attributes

  *   `aspects` (*type:* `%{optional(String.t) => GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Aspect.t}`, *default:* `nil`) - Optional. The aspects that are attached to the entry. Depending on how the aspect is attached to the entry, the format of the aspect key can be one of the following: If the aspect is attached directly to the entry: {project_id_or_number}.{location_id}.{aspect_type_id} If the aspect is attached to an entry's path: {project_id_or_number}.{location_id}.{aspect_type_id}@{path}
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the entry was created in Dataplex.
  *   `entrySource` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntrySource.t`, *default:* `nil`) - Optional. Information related to the source system of the data resource that is represented by the entry.
  *   `entryType` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. The relative resource name of the entry type that was used to create this entry, in the format projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_type_id}.
  *   `fullyQualifiedName` (*type:* `String.t`, *default:* `nil`) - Optional. A name for the entry that can be referenced by an external system. For more information, see Fully qualified names (https://cloud.google.com/data-catalog/docs/fully-qualified-names). The maximum size of the field is 4000 characters.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Identifier. The relative resource name of the entry, in the format projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}.
  *   `parentEntry` (*type:* `String.t`, *default:* `nil`) - Optional. Immutable. The resource name of the parent entry, in the format projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the entry was last updated in Dataplex.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :aspects =>
            %{optional(String.t()) => GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Aspect.t()}
            | nil,
          :createTime => DateTime.t() | nil,
          :entrySource => GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntrySource.t() | nil,
          :entryType => String.t() | nil,
          :fullyQualifiedName => String.t() | nil,
          :name => String.t() | nil,
          :parentEntry => String.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:aspects, as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Aspect, type: :map)
  field(:createTime, as: DateTime)
  field(:entrySource, as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntrySource)
  field(:entryType)
  field(:fullyQualifiedName)
  field(:name)
  field(:parentEntry)
  field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Entry do
  def decode(value, options) do
    GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Entry.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Entry do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
